home *** CD-ROM | disk | FTP | other *** search
/ New Perspectives on Computer Concepts / New Perspectives on Computer Concepts.iso / np2010c / L02a.swf / scripts / QuizSuperClass.as < prev    next >
Text File  |  2007-12-30  |  525b  |  23 lines

  1. _global.Quiz = function()
  2. {
  3.    this.total_correct = 0;
  4.    this.total_wrong = 0;
  5.    this.quest_to_ask = 0;
  6.    this.activity_ID = undefined;
  7.    this.activity_name = undefined;
  8. };
  9. _global.Quiz.prototype = new Object();
  10. Object.registerClass("QuizSuperClass",Quiz);
  11. Quiz.prototype.countScore = function(weightNum)
  12. {
  13.    if(weightNum < 0)
  14.    {
  15.       this.total_wrong += Math.abs(weightNum);
  16.    }
  17.    else
  18.    {
  19.       this.total_correct += Number(weightNum);
  20.    }
  21.    this.quest_to_ask = this.quest_to_ask - 1;
  22. };
  23.